<?php slot ( 'title', 'Search Deadlines' );
?>
<?php slot ('header')?>
<h1>Search Deadlines</h1>
<?php end_slot()?>
<?php slot ('side_bar') ?>
<h2>View</h2>
<ul>
    <li><?php echo link_to('Calendar', '@planning_calendar_no_dates?pr_slug='.$prSlug);?></li>
    <li><?php echo link_to('List', '@planning_list?pr_slug='.$prSlug )?></li>
    <li><?php echo link_to('Gantt Chart', '@planning_chart?pr_slug='.$prSlug)?></li>
</ul>
<h2>Search</h2>
<ul>
    <li><?php echo link_to('Search', '@planning_search?pr_slug='.$prSlug )?></li>
</ul>
<h2>Deadlines</h2>
<ul>
    <li><?php echo link_to('Add', '@planning_create?pr_slug='.$prSlug )?></li>
</ul>
<?php end_slot() ?>
<div id="plan">
</div>


<form action=<?php echo url_for('@planning_list?pr_slug='.$prSlug)?>>
    <TABLE>
    <tr><td>Importance Greater Than:</td><td><input type="text" name="importance" value="0"/></td></tr>
    <?php if (count($allGroups) > 0): ?>
        <tr><td>Group:</td><td> <select name="group">
        <OPTION value="0" selected="selected">ALL</OPTION>
        <?php foreach ($allGroups as $group): ?>
            <?php echo "<option value=".$group->getID().">".$group->getName()."</option>" ?>
        <?php endforeach; ?>
        </select>
    </td></tr>
    <?php endif; ?>
    <?php if (count($allUsers) > 0): ?>
        <tr><td>Created By:</td><td> <select name="createdBy">
        <OPTION value="0" selected="selected">NONE</OPTION>
        <?php foreach ($allUsers as $user): ?>
            <?php echo "<option value=".$user->getID().">".$user->getFirstName()." ".$user->getLastName()."</option>" ?>
        <?php endforeach; ?>
        </select>
    <?php endif; ?>
    <?php use_helper('DateForm') ?>
    <tr><td>Deadline Before:</td><td> <?php echo input_date_tag('dueBefore', time(), 'rich=false')?> 
    </td></tr>
    </TABLE>
    <input type="submit" value="Search" />
    <input type="reset" value="Reset" />
</form>